﻿/*
 * File: Tile.cs (Original filename: Terrain.cs)
 * Developer : Brent Larsen (brentoboy@gmail.com)
 * Date: 2011-AUG-9
 * Copyright (c) 2011 Brent Larsen.
 * Distributed under the terms of the GPL v3
 *  
 * This file is part of GenX-RPG
 * http://code.google.com/p/genx-rpg/ 
 * 
 * GenX-RPG is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * GenX-RPG is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with GenX-RPG.  If not, see <http://www.gnu.org/licenses/>.
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Rpg
{
    public class Tile
    {
        public const int SQUARE_SIZE = 16;
        public const int BLOCK_NONE = 0;
        public const int BLOCK_NORTH = 1;
        public const int BLOCK_EAST = 2;
        public const int BLOCK_SOUTH = 4;
        public const int BLOCK_WEST = 8;
        public const int BLOCK_ALL = BLOCK_NORTH | BLOCK_EAST | BLOCK_SOUTH | BLOCK_WEST; // 15

        public int Id { get; set; }
        public string UniqueId { get; set; }
        public string Name { get; set; }
        public string BmpName { get; set; }
        public int BmpX { get; set; }
        public int BmpY { get; set; }
        public string GroupName { get; set; }
        public int GroupX { get; set; }
        public int GroupY { get; set; }
        public int Walk { get; set; }

        public Tile(int id, string uniqueId, string name, int bmpX, int bmpY, string groupName, int groupX, int groupY, int walk)
        {
            this.Id = id;
            this.UniqueId = uniqueId;
            this.Name = name;
            this.BmpX = bmpX * SQUARE_SIZE;
            this.BmpY = bmpY * SQUARE_SIZE;
            this.GroupName = groupName;
            this.GroupX = groupX;
            this.GroupY = groupY;
            this.Walk = walk;
        }
    }
}
